Lisp { Almost a Whole Truth !

نویسنده

  • Christian Queinnec
چکیده

Lisp is well known for its metacircular deenitions. They diier by their intent (what they want to prove), their means (what linguistic features are allowed for the deenition) and by their scope (what linguistic features are described). This paper provides a new metacircular deenition for a complete Lisp system including traditionally neglected features such as cons, read, print and error. The programming style adopted for this interpreter is inspired both by denotational semantics and its continuation passing style (to explain continuation handling) and by the object oriented paradigm as highlighted by type-driven generic functions. The resulting interpreter lessens the number of primitives it uses to only eight: car, cdr, rplaca, rplacd, eq, read-char, write-char and end, while still providing Scheme-like essential capabilities (less arithmetic). The overall size is near 500 lines of fully encapsulated code that, if eeciency is not the main requirement, can be easily turned into a stand alone program. Since the birth of Lisp, the art of the interpreter has always been considered as one of the major Lisp rites. Ranging from very simple McCarthy 78] to more complex Rees & Clinger 86], a Lisp interpreter is a must of many courses, many books Abelson & Sussman 85, Dybvig 87, Queinnec 84, Winston 88, : : : ] and many articles Friedman & Wand 84, Reynolds 72, : : : ]. The success of this cult is due to | (i) the amazing simplicity that can have such interpreters | (ii) the pedagogical beneets of either reading or writing such descriptions | (iii) the overall conndence given to the writer of such a program that s/he has now fully mastered the language. Interpreters also provide an interesting way to design variants of Lisp Steele & Sussman 78, des Rivieres & Smith 84]. They truly are speciications of languages Reynolds 72] from which can be derived compilers Clinger 84] or entire systems Brooks & Gabriel & Steele 82, Saint James 87]. Without quantifying their intentions (pedagogy Kessler 88], proof length Boyer & Moore 82] or even graphics Lakin 80]) a taxonomy of these interpreters can be attempted along two main axis, see gure 1: the speciied language (given to the user), the language for the speciication (allowed for the implementer). These axis are mere abstractions since power of languages is diicult to appreciate and is probably more related to trees than to straight lines. For example, allowing assignment …

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Truth in the Context of Christian Faith and its Relation to Other Religions

In the following reflections on the understanding of truth in regard to Christian faith (or even in regard to religious faith, experience, and language in general), I advocate a relational interpretation of truth. Truth in that sense is understood not primarily as an intellectual assertion but as a qualification of a dynamic, existential, personal relation. Truth is the trustworthiness of that ...

متن کامل

Lisp-in-Lisp: High Performance and Portability

Until recently every Lisp implementation has had either a relatively large assembly language core or extensive microcode support. We have been working on a Common Lisp [Steele 1982] for the S-1 Mark IIA super-computer being developed at LLNL, producing an implementation that has high performance, exploits the complex architecture of the S-1, and which is almost entirely written in Lisp [Brooks ...

متن کامل

The Gabriel 'Triangle' Benchmark at Warp Speed

We show how to speed up the Gabriel 'Triangle' Benchmark by more than two orders of magnitude (206 X faster than the Cray-1) on a Common Lisp system running on the 80860-based OKIstation, by using better programming techniques. The resulting program fits nicely within next generation on-chip caches and kills almost all potential parallelism, thus becoming worthless as a general-purpose Lisp ben...

متن کامل

Practical Reflection in Nuprl

We present an implementation of reflection for the Nuprl theorem prover, based on combining intuitions from programming languages and logical languages. We reflect a logical language, adapting the common practice from Lisp dialects of avoiding redundant coding whenever it is possible to expose internal functionality. In particular, concepts of the logical language such as term syntax and substi...

متن کامل

Lisp Algorithms 1 1 . Using the New Common Lisp Pretty Printer

This technical report gathers together three papers that were written during 1992 and 1993 and submitted for publication in ACM Lisp Pointers. Chapter 1 \Using the New Common Lisp Pretty Printer" explains how the pretty printing facilities that have been adopted as part of the forthcoming Common Lisp standard can be used to gain detailed control over the printing of lists. As an example, it sho...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1989